/**
 * 
 */
package edu.itesm.listillo;

/**
 * @author pcel
 * stores Knowls: units of knowledge, in an array
 */
public class Knowledge {
	Knowl[] knowls;
	int index;
	
	/**
	 * This is one unit of knowledge: a conversion factor
	 */
	private class Knowl {
		String oneUnit, anotherUnit;
		Number equivalence;
	}
	
	public void Knowledge(){
		index = 0;
	}
	
	/** learns about a new conversion factor
	 * 
	 * @param firstUnit
	 * @param secondUnit
	 * @param conversionFactor: one firstUnit = conversion factor secondUnits; say 1 km = 1000 meters
	 */
	public void learn(String firstUnit, String secondUnit, Number conversionFactor) {
		Knowl aKnowl = new Knowl();
		aKnowl.oneUnit = firstUnit;
		aKnowl.anotherUnit = secondUnit;
		aKnowl.equivalence = conversionFactor;
		index++;
		knowls[index] = aKnowl;
	} 
	/** Applies knowledge to answer user's queries
	 * 
	 */
	public Float applyKnowledge(String firstUnit, Float numero, String secondUnit) {
		
	}
	
	

}


